package com.example.jobsearch.mapper;

import com.example.jobsearch.model.CompanyInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CompanyInfoMapper {
    @Select("SELECT * FROM company_info WHERE job_name LIKE CONCAT('%', #{jobName}, '%') AND fl LIKE CONCAT('%', #{fl}, '%')")
    List<CompanyInfo> searchJobs(String jobName, String fl);

    @Select("SELECT * FROM company_info WHERE job_name = #{jobName}")
    CompanyInfo getJobByName(String jobName);
}